package yartiss.engine.simulation.energy.profiles.consumption;

import java.util.Collections;
import java.util.List;

import yartiss.engine.simulation.IEnergyConsumptionProfile;

public class ConstantEnergyConsumptionProfile implements IEnergyConsumptionProfile{

	@Override
	public String getName() {
		return "constant";
	}

	@Override
	public List<Double> getParameters() {
		return Collections.emptyList();
	}
	
	@Override
	public void setParameters(List<Double> params) {
		
	}

	@Override
	public long getConsumed(long wcet, long wcee, long romainingTimeCost,	long duration) {
		long rate = wcee/wcet;
		return rate * duration;
	}

	@Override
	public IEnergyConsumptionProfile cloneProfile() {
		return new ConstantEnergyConsumptionProfile();
	}
}
